package com.liujg.future.model.resp;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Meta {

    private String message;

    private Integer status;

    @JsonIgnore
    private static final Meta suc = new Meta("success",200);
    public static Meta success(){
        return suc;
    }

    public static Meta fail(String msg,Integer code){
        if(null == code){
            code = 4001;
        }
        return new Meta(msg,code);
    }
}
